#ifndef DEZ_I2SAUDIO_H
#define DEZ_I2SAUDIO_H
#include <stdlib.h>
#include "driver/i2s.h"
#include "esp_log.h"
#include "audio_element.h"
#include "raw_stream.h"
#define CONFIG_SAMPLE_RATE 8000
#define CONFIG_COUNT 62  //62* 4字节=ESPNOW发送的248字节
// #define CONFIG_I2S_CH0 0
// #define CONFIG_I2S_CH1 1
extern int  AUDIT_BIT;


uint32_t *samples_32bit; //读出来的原始32位采样数据
uint16_t *samples_16bit; //读出来的原始16位采样数据
uint32_t *output_32bit;//ESPNOW接收转换回32bit
uint16_t *output_16bit;//ESPNOW接收转换回16bit
uint8_t *samples_8bit;  //转换后的8位采样数据


//void init_i2s_device();
int readVoice(uint8_t *samples, int count, audio_element_handle_t raw_stream_reader);


#endif
